3.1.7 \(\int \frac {\cot ^3(x)}{a+a \cos (x)} \, dx\) [7]

Optimal. Leaf size=46 \[ \frac {3 \tanh ^{-1}(\cos (x))}{8 a}-\frac {\cot ^4(x)}{4 a}-\frac {3 \cot (x) \csc (x)}{8 a}+\frac {\cot ^3(x) \csc (x)}{4 a} \]

[Out]

3/8*arctanh(cos(x))/a-1/4*cot(x)^4/a-3/8*cot(x)*csc(x)/a+1/4*cot(x)^3*csc(x)/a

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {2785, 2687, 30, 2691, 3855} \begin {gather*} -\frac {\cot ^4(x)}{4 a}+\frac {3 \tanh ^{-1}(\cos (x))}{8 a}+\frac {\cot ^3(x) \csc (x)}{4 a}-\frac {3 \cot (x) \csc (x)}{8 a} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[x]^3/(a + a*Cos[x]),x]

[Out]

(3*ArcTanh[Cos[x]])/(8*a) - Cot[x]^4/(4*a) - (3*Cot[x]*Csc[x])/(8*a) + (Cot[x]^3*Csc[x])/(4*a)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2687

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2691

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b*(a*Sec[e +
 f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m + n - 1))), x] - Dist[b^2*((n - 1)/(m + n - 1)), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 2785

Int[((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_.)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[1/a, Int[S
ec[e + f*x]^2*(g*Tan[e + f*x])^p, x], x] - Dist[1/(b*g), Int[Sec[e + f*x]*(g*Tan[e + f*x])^(p + 1), x], x] /;
FreeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && NeQ[p, -1]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {\cot ^3(x)}{a+a \cos (x)} \, dx &=-\frac {\int \cot ^4(x) \csc (x) \, dx}{a}+\frac {\int \cot ^3(x) \csc ^2(x) \, dx}{a}\\ &=\frac {\cot ^3(x) \csc (x)}{4 a}+\frac {3 \int \cot ^2(x) \csc (x) \, dx}{4 a}-\frac {\text {Subst}\left (\int x^3 \, dx,x,-\cot (x)\right )}{a}\\ &=-\frac {\cot ^4(x)}{4 a}-\frac {3 \cot (x) \csc (x)}{8 a}+\frac {\cot ^3(x) \csc (x)}{4 a}-\frac {3 \int \csc (x) \, dx}{8 a}\\ &=\frac {3 \tanh ^{-1}(\cos (x))}{8 a}-\frac {\cot ^4(x)}{4 a}-\frac {3 \cot (x) \csc (x)}{8 a}+\frac {\cot ^3(x) \csc (x)}{4 a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.18, size = 60, normalized size = 1.30 \begin {gather*} -\frac {-8+2 \cot ^2\left (\frac {x}{2}\right )-12 \cos ^2\left (\frac {x}{2}\right ) \left (\log \left (\cos \left (\frac {x}{2}\right )\right )-\log \left (\sin \left (\frac {x}{2}\right )\right )\right )+\sec ^2\left (\frac {x}{2}\right )}{16 a (1+\cos (x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[x]^3/(a + a*Cos[x]),x]

[Out]

-1/16*(-8 + 2*Cot[x/2]^2 - 12*Cos[x/2]^2*(Log[Cos[x/2]] - Log[Sin[x/2]]) + Sec[x/2]^2)/(a*(1 + Cos[x]))

________________________________________________________________________________________

Maple [A]
time = 0.10, size = 44, normalized size = 0.96

method result size
default \(\frac {\frac {1}{-8+8 \cos \left (x \right )}-\frac {3 \ln \left (-1+\cos \left (x \right )\right )}{16}-\frac {1}{8 \left (\cos \left (x \right )+1\right )^{2}}+\frac {1}{2 \cos \left (x \right )+2}+\frac {3 \ln \left (\cos \left (x \right )+1\right )}{16}}{a}\) \(44\)
risch \(\frac {5 \,{\mathrm e}^{5 i x}+2 \,{\mathrm e}^{4 i x}+2 \,{\mathrm e}^{3 i x}+2 \,{\mathrm e}^{2 i x}+5 \,{\mathrm e}^{i x}}{4 \left ({\mathrm e}^{i x}+1\right )^{4} a \left ({\mathrm e}^{i x}-1\right )^{2}}-\frac {3 \ln \left ({\mathrm e}^{i x}-1\right )}{8 a}+\frac {3 \ln \left ({\mathrm e}^{i x}+1\right )}{8 a}\) \(87\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(x)^3/(a+a*cos(x)),x,method=_RETURNVERBOSE)

[Out]

1/a*(1/8/(-1+cos(x))-3/16*ln(-1+cos(x))-1/8/(cos(x)+1)^2+1/2/(cos(x)+1)+3/16*ln(cos(x)+1))

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 56, normalized size = 1.22 \begin {gather*} \frac {5 \, \cos \left (x\right )^{2} + \cos \left (x\right ) - 2}{8 \, {\left (a \cos \left (x\right )^{3} + a \cos \left (x\right )^{2} - a \cos \left (x\right ) - a\right )}} + \frac {3 \, \log \left (\cos \left (x\right ) + 1\right )}{16 \, a} - \frac {3 \, \log \left (\cos \left (x\right ) - 1\right )}{16 \, a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^3/(a+a*cos(x)),x, algorithm="maxima")

[Out]

1/8*(5*cos(x)^2 + cos(x) - 2)/(a*cos(x)^3 + a*cos(x)^2 - a*cos(x) - a) + 3/16*log(cos(x) + 1)/a - 3/16*log(cos
(x) - 1)/a

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 83 vs. \(2 (38) = 76\).
time = 0.43, size = 83, normalized size = 1.80 \begin {gather*} \frac {10 \, \cos \left (x\right )^{2} + 3 \, {\left (\cos \left (x\right )^{3} + \cos \left (x\right )^{2} - \cos \left (x\right ) - 1\right )} \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - 3 \, {\left (\cos \left (x\right )^{3} + \cos \left (x\right )^{2} - \cos \left (x\right ) - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) + 2 \, \cos \left (x\right ) - 4}{16 \, {\left (a \cos \left (x\right )^{3} + a \cos \left (x\right )^{2} - a \cos \left (x\right ) - a\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^3/(a+a*cos(x)),x, algorithm="fricas")

[Out]

1/16*(10*cos(x)^2 + 3*(cos(x)^3 + cos(x)^2 - cos(x) - 1)*log(1/2*cos(x) + 1/2) - 3*(cos(x)^3 + cos(x)^2 - cos(
x) - 1)*log(-1/2*cos(x) + 1/2) + 2*cos(x) - 4)/(a*cos(x)^3 + a*cos(x)^2 - a*cos(x) - a)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\cot ^{3}{\left (x \right )}}{\cos {\left (x \right )} + 1}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)**3/(a+a*cos(x)),x)

[Out]

Integral(cot(x)**3/(cos(x) + 1), x)/a

________________________________________________________________________________________

Giac [A]
time = 0.47, size = 50, normalized size = 1.09 \begin {gather*} \frac {3 \, \log \left (\cos \left (x\right ) + 1\right )}{16 \, a} - \frac {3 \, \log \left (-\cos \left (x\right ) + 1\right )}{16 \, a} + \frac {5 \, \cos \left (x\right )^{2} + \cos \left (x\right ) - 2}{8 \, a {\left (\cos \left (x\right ) + 1\right )}^{2} {\left (\cos \left (x\right ) - 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^3/(a+a*cos(x)),x, algorithm="giac")

[Out]

3/16*log(cos(x) + 1)/a - 3/16*log(-cos(x) + 1)/a + 1/8*(5*cos(x)^2 + cos(x) - 2)/(a*(cos(x) + 1)^2*(cos(x) - 1
))

________________________________________________________________________________________

Mupad [B]
time = 0.41, size = 40, normalized size = 0.87 \begin {gather*} -\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^6-6\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4+12\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )+2}{32\,a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(x)^3/(a + a*cos(x)),x)

[Out]

-(tan(x/2)^6 - 6*tan(x/2)^4 + 12*tan(x/2)^2*log(tan(x/2)) + 2)/(32*a*tan(x/2)^2)

________________________________________________________________________________________